package com.solution.delegate;

import java.util.List;

import com.solution.exception.DelegateException;
import com.solution.exception.ServiceBeanException;
import com.solution.exception.ServiceLocatorException;
import com.solution.model.ClientType;
import com.solution.service.AnswerTypeService;
import com.solution.service.ClientTypeService;
import com.solution.util.SearchVO;
import com.solution.util.ServiceLocator;

public class ClientServiceDelegate implements ClientTypeService {
	private ClientTypeService clientTypeService;
	public ClientServiceDelegate() throws DelegateException{
		try {
			clientTypeService = (ClientTypeService)ServiceLocator.getInstance().getRemoteService("ClientTypeService");
		}catch (ServiceLocatorException e) {
		throw new DelegateException(e); 
	}
	}

	public ClientType createClient(ClientType clientType)
			throws ServiceBeanException {		
		return clientTypeService.createClient(clientType);
	}

	public List<ClientType> fetchActiveClients() throws ServiceBeanException {		
		return clientTypeService.fetchActiveClients();
	}

	public ClientType getClient(Long clientTypeId) throws ServiceBeanException {		
		return clientTypeService.getClient(clientTypeId);
	}

	public List<ClientType> getClients(SearchVO searchVO)
			throws ServiceBeanException {
		return clientTypeService.getClients(searchVO);
	}

	public ClientType modifyClient(ClientType clientType)
			throws ServiceBeanException {		
		return clientTypeService.modifyClient(clientType);
	}

}
